package com.isoft.illustrationsdraw.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.isoft.illustrationsdraw.entity.IllustrationTag;
import com.isoft.illustrationsdraw.mapper.IllustrationTagMapper;
import com.isoft.illustrationsdraw.service.IllustrationTagService;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class IllustrationTagServiceImpl extends ServiceImpl<IllustrationTagMapper, IllustrationTag> implements IllustrationTagService {
    public List<IllustrationTag> getTagsByIllustrationId(Long illustrationId) {

        LambdaQueryWrapper<IllustrationTag> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(IllustrationTag::getIllustrationsId, illustrationId);
        return this.list(lambdaQueryWrapper);
    }
}
